x86/EFI: further correct FPU state handling around runtime calls
authorJan Beulich <jbeulich@suse.com>
Tue, 26 Jun 2018 13:26:24 +0000 (15:26 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 26 Jun 2018 13:26:24 +0000 (15:26 +0200)
commitb4cf1d608bb7d73d7827d794d4d3b7f19de8c274
tree06ca416bd0f9ee3194e003290e83b7dbc4661ce4
parent1c88cadbe57b5c3a5bfb35507fea1ba6eafee219
x86/EFI: further correct FPU state handling around runtime calls

We must not leave a vCPU with CR0.TS clear when it is not in fully eager
mode and has not touched non-lazy state. Instead of adding a 3rd
invocation of stts() to vcpu_restore_fpu_eager(), consolidate all of
them into a single one done at the end of the function.

Rename the function at the same time to better reflect its purpose, as
the patches touches all of its occurences anyway.

The new function parameter is not really well named, but
"need_stts_if_not_fully_eager" seemed excessive to me.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
master commit: 23839a0fa0bbe78c174cd2bb49083e153f0f99df
master date: 2018-06-26 15:23:08 +0200
xen/arch/x86/domain.c
xen/arch/x86/hvm/emulate.c
xen/arch/x86/i387.c
xen/common/efi/runtime.c
xen/include/asm-x86/i387.h